Fix x/y coordinates for extended events.
authorCarlos Garnacho <carlos@gnome.org>
Mon, 21 Sep 2009 00:08:41 +0000 (02:08 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 21 Sep 2009 18:04:21 +0000 (20:04 +0200)
Extended events were being reported to virtual windows without taking into
account the position of the virtual window inside the native one.

https://bugzilla.gnome.org/show_bug.cgi?id=588649

gdk/x11/gdkinput-x11.c

index 22e39a05c715778bce8f5a68d397e44994e66f6f..c0b71e7bef114484eeff64ffd9c14519c80a6da3 100644 (file)
@@ -456,8 +456,8 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
       x_scale = gdk_screen_get_width (gdk_drawable_get_screen (window)) / device_width;
       y_scale = gdk_screen_get_height (gdk_drawable_get_screen (window)) / device_height;
 
-      x_offset = - impl_window->input_window->root_x;
-      y_offset = - impl_window->input_window->root_y;
+      x_offset = - impl_window->input_window->root_x - priv->abs_x;
+      y_offset = - impl_window->input_window->root_y - priv->abs_y;
     }
   else                         /* GDK_MODE_WINDOW */
     {